package com.entrogy.bean;

import org.apache.catalina.User;

import java.io.Serializable;
import java.sql.Date;
import java.util.List;

/**
 * 角色的实体类，含有属于该角色的user集合，
 * 以及属于该角色的权限集合，便于前端显示权限管理页面并实现授权设置
 */
public class Role implements Serializable {

    //主键id
    private long rId;
    //角色名字
    private String roleName;
    //创建时间
    private Date createTime;
    //更新时间
    private Date updateTime;
    //是否启用1有效0无效
    private int deleteStatus;
    //属于该角色的user集合
    private List<User> users;
    //属于该角色的权限集合
    private List<PermissionAndMenu> permissionAndMenus;
    //学校ID
    private Integer schoolCode;
    //角色所属学校名字
    private String schoolName;

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public long getrId() {
        return rId;
    }

    public void setrId(long rId) {
        this.rId = rId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public int getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(int deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    public List<User> getUsers() {
        return users;
    }

    public void setUsers(List<User> users) {
        this.users = users;
    }

    public List<PermissionAndMenu> getPermissionAndMenus() {
        return permissionAndMenus;
    }

    public void setPermissionAndMenus(List<PermissionAndMenu> permissionAndMenus) {
        this.permissionAndMenus = permissionAndMenus;
    }

    public Integer getSchoolCode() {
        return schoolCode;
    }

    public void setSchoolCode(Integer schoolCode) {
        this.schoolCode = schoolCode;
    }
}
